home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / UTILITIE / CONVERSI / 1396.ZIP / CCUR.DOC < prev    next >
Text File  |  1986-03-30  |  8KB  |  217 lines

  1.                                 COUNTING CURSOR
  2.                                    Rev. 1.1
  3.                          (c) 1986 by Thomas A. Lundin
  4.                               All Rights Reserved
  5.  
  6.  
  7.                                   BACKGROUND
  8.  
  9. In the course of my involvement in media conversion services -- for example,
  10. taking a 9-track magnetic tape and transferring the data onto an IBM PC floppy
  11. -- I am often given a data base file of some kind to be processed from a
  12. fixed-length format to comma-delimited SDF or some such type. Usually, these
  13. files are not accompanied by any record layout, so I must resort to calling up
  14. a portion of the file using the TYPE command (or some screen editor) and
  15. manually counting characters to establish the layout. Accuracy is critical, so
  16. I'll usually go through this counting procedure at least twice until I'm
  17. satisfied that the field lengths I've come up with are correct. The public
  18. domain program RULER.COM had been a big help in giving me a visual point of
  19. reference on the screen when counting across large voids of blank spaces.
  20. Taking the idea behind RULER a step further, I wrote CCUR.EXE, the Counting
  21. Cursor program.
  22.  
  23. CCUR places a movable cursor on a static screen display and lets your fingers
  24. do the walking while the cursor does the counting. The counter can be toggled
  25. on or off and initialized to zero or one anywhere on the screen, giving you a
  26. quick count of the characters spanning two points.
  27.  
  28. Features of CCUR include a constantly-updated row/column coordinate readout;
  29. the ability to jump to the top left, lower right, or center of the display, as
  30. well as to the beginning or end of a line with a single keystroke; the ability
  31. to skip forward or backward a specified number of characters from the current
  32. point; the ability to write the displayed widths to a file for external
  33. reference; and the ability to save the screen image in a disk file.
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. COUNTING CURSOR                                                        Page 1
  54.  
  55.                                    OPERATION
  56.  
  57. Usage:
  58.      CCUR [ filename ]
  59.  
  60. The "filename" is optional. It creates a filename to which data will be
  61. written when the Write Count and Save Screen commands are issued. If the
  62. filename is not given, all file output will be directed to the screen. The DOS
  63. device names PRN, CON, AUX, and NUL are acceptable filenames.
  64.  
  65. The current display is left as-is, but a status line is displayed on line 25
  66. of the screen. A block cursor is positioned at the upper left corner of the
  67. display.
  68.  
  69. THE STATUS LINE
  70.  
  71. The left portion of the status line lists which keys are valid operations in
  72. CCUR; the right portion of the status line provides a readout of the current
  73. counter value (or OFF), the value offset (0 or 1), and the current cursor
  74. row/column coordinate.
  75.  
  76.      Arrow Keys
  77.      These keys operate as you would expect them to.
  78.  
  79.      HOME key
  80.      Places the cursor at the start of the current row, updates the counter
  81.      accordingly.
  82.  
  83.      END key
  84.      Places the cursor at the end of the current row, updates the counter
  85.      accordingly.
  86.  
  87.      PgUp key
  88.      Places the cursor in the upper left corner, updates the counter
  89.      accordingly.
  90.  
  91.      PgDn key
  92.      Places the cursor in the lower right corner, updates the counter
  93.      accordingly.
  94.  
  95.      5 key (num pad shift 5)
  96.      Places the cursor in the middle of the display area, updates the counter
  97.      accordingly.
  98.  
  99.      Gray (-) key
  100.      Allows input of a numeric value to be subtracted from the current cursor
  101.      location. The cursor is positioned backward the number of characters
  102.      specified by the value, and the counter is updated. If the value would
  103.      cause the cursor to be displayed past the HOME position, the operation is
  104.      ignored.
  105.  
  106.  
  107. COUNTING CURSOR                                                        Page 2
  108.  
  109.      Gray (+) key
  110.      Allows input of a numeric value to be added to the current cursor
  111.      location. The cursor is positioned forward the number of characters
  112.      specified by the value, and the counter is updated. If the value would
  113.      cause the cursor to be displayed past the END position, the operation is
  114.      ignored.
  115.  
  116.      '0' (zero)
  117.      Causes the base counter and coordinate values to begin at zero. This
  118.      command is provided for notational convenience, as you might be
  119.      accustomed to counting from zero.
  120.  
  121.      '1' (one)
  122.      Causes the base counter and coordinate values to begin at one. This
  123.      command is provided for notational convenience, as you might be
  124.      accustomed to counting from one.
  125.  
  126.      'C'ount
  127.      If the counter is currently OFF, this command turns the counter ON and
  128.      initializes it. If the counter is currently ON, this command turns the
  129.      counter OFF. An active counter can be cleared by pressing 'C' twice.
  130.  
  131.      'W'rt
  132.      If the counter is ON, the current value in the counter display is
  133.      recorded in memory and will be written to a disk file when the program is
  134.      exited. The Wrt (Write Count) command can be executed multiple times;
  135.      each counter value recorded will be separated by a comma. The colon
  136.      following the word "Count" will blink to inform you that the recording
  137.      has taken place.
  138.  
  139.      '*'Sv (unshifted PrtSc)
  140.      The current screen image will be saved to a disk file if a filename was
  141.      entered at the command prompt. Once the *Sv (Save Screen) command is
  142.      executed, the asterisk will blink to inform you that the feature is
  143.      active. Each saved screen line is terminated by a carriage return/line
  144.      feed combination and trailing blanks at the end of screen lines are
  145.      removed.
  146.  
  147.      ESC key or 'E'
  148.      Exits back to DOS. If the Wrt or *Sv commands were used, their data will
  149.      be sent to the designated file before exiting. The default output file is
  150.      the screen, but it can be a disk file or even the printer if, at start-up
  151.      time, a filename follows the CCUR command (see the Usage, above).
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161. COUNTING CURSOR                                                        Page 3
  162.  
  163.                                      NOTES
  164.  
  165. PROGRAM INFORMATION:
  166. CCUR was written in Lattice C, v 2.0, using the Dewar Advanced Editor, v 6.03.
  167. Screen I/O routines from JCLIB.C by Dr. Jim Conn.
  168.  
  169. SYSTEM REQUIREMENTS:
  170. IBM PC or compatible, 128K memory
  171.  
  172. DISCLAIMER:
  173. This program is provided as-is. It is stable and bug-free on IBM PC and
  174. compatible machines, and yet: It may not do what you want it to do, and it may
  175. not work on your particular non-PC system.
  176.  
  177. LICENSE:
  178. You may copy this program all you want. Share it. Upload it. Use it.
  179. Don't charge any money for its distribution or use, unless a portion of what
  180. you charge is contributed to me. Also, don't integrate this program with any
  181. other program or commercial service and try to claim it's your property;
  182. that's unethical and dishonorable.
  183.  
  184. BUG FIXES:
  185. Ver. 1.1:      Minor bug in Wrt command corrected to now record the displayed
  186.                value of the counter, as opposed to the zero offset value.
  187.  
  188. FINALLY:
  189. If you find this program to be of value, contributions (up to $10) will be
  190. gratefully accepted.
  191.  
  192. Send comments/bug reports/donations to:
  193.  
  194. Thomas A. Lundin
  195. Graphics Unlimited Inc.
  196. 3000 Second Street North
  197. Minneapolis, MN 55411
  198.  
  199. (612) 588-7571
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215. COUNTING CURSOR                                                        Page 4
  216.  
  217.